package com.lagou.service.impl;


import com.lagou.service.EchoService;
import org.apache.dubbo.config.annotation.Service;
import org.apache.dubbo.rpc.RpcContext;

@Service
public class EchoServiceImpl implements EchoService {

    @Override
    public String echo(String name) {
        String remoteAddr = RpcContext.getContext().getAttachment("remoteAddr");
        System.out.println("EchoService:" + remoteAddr);
        return "echo:" + name;
    }

}